package org.linlinjava.litemall.db.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("litemall_gift_card_classification")
public class LitemallGiftCardClassification {

    /**
     * 序号
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 礼物卡分类名称
     */
    private String classificationName;

    /**
     * 礼物卡分类状态
     */
    private Integer classificationStatus;

    /**
     * 礼物卡分类排序
     */
    private Integer classificationSort;

    /**
     * 创建时间
     */
    private LocalDateTime addTime;

    /**
     * 修改时间
     */
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    private Boolean deleted;

//    public enum Column {
//        id("id", "id", "INTEGER", false),
//        classificationName("classification_name", "classificationName", "VARCHAR", false),
//        classificationStatus("classification_status", "classificationStatus", "INTEGER", false),
//        classificationSort("classification_sort", "classificationSort", "INTEGER", false),
//        addTime("present_points", "presentPoints", "DECIMAL", false),
//        updateTime("update_time", "updateTime", "TIMESTAMP", false),
//        deleted("deleted", "deleted", "BIT", false);
//
//        private static final String BEGINNING_DELIMITER = "`";
//
//        private static final String ENDING_DELIMITER = "`";
//
//        private final String column;
//
//        private final boolean isColumnNameDelimited;
//
//        private final String javaProperty;
//
//        private final String jdbcType;
//
//        public String value() {
//            return this.column;
//        }
//
//        public String getValue() {
//            return this.column;
//        }
//
//        public String getJavaProperty() {
//            return this.javaProperty;
//        }
//
//        public String getJdbcType() {
//            return this.jdbcType;
//        }
//
//        Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
//            this.column = column;
//            this.javaProperty = javaProperty;
//            this.jdbcType = jdbcType;
//            this.isColumnNameDelimited = isColumnNameDelimited;
//        }
//
//        public String desc() {
//            return this.getEscapedColumnName() + " DESC";
//        }
//
//        public String asc() {
//            return this.getEscapedColumnName() + " ASC";
//        }
//
//        public static LitemallDistributionDetail.Column[] excludes(LitemallDistributionDetail.Column... excludes) {
//            ArrayList<LitemallDistributionDetail.Column> columns = new ArrayList<>(Arrays.asList(LitemallDistributionDetail.Column.values()));
//            if (excludes != null && excludes.length > 0) {
//                columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
//            }
//            return columns.toArray(new LitemallDistributionDetail.Column[]{});
//        }
//
//        public String getEscapedColumnName() {
//            if (this.isColumnNameDelimited) {
//                return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
//            } else {
//                return this.column;
//            }
//        }
//
//        public String getAliasedEscapedColumnName() {
//            return this.getEscapedColumnName();
//        }
//    }


}
